<extend name="Public:base" />
<block name="main">
    <div class="content" id="js-date">
        <section class="location">
            <i class="iconfont">&#xe60f</i> 位置：<a href="{:U('Index/main')}">管理首页</a> &gt; 抽奖管理
        </section>
        <ul class="nav-tabs clearfix">
            <li class="active">抽奖管理</li>
            <li><a href="{:U('Activity/add')}">新建抽奖</a></li>
        </ul>
        

        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-hover">
            <thead>
                <tr>
                    <th width="20"><input type="checkbox" name="chkAll" id="chkAll" onClick="ChkAllClick('id[]', 'chkAll')" /></th>
                    <th width="20">ID</th>
                    <th width="150">名称</th>
                    <th width="150">&nbsp;</th>
                    <th>介绍</th>
                </tr>
            </thead>
            <tbody>
            <volist name="viewList" id="data" empty="暂时没有数据">
                <tr>
                    <td><input type="checkbox" name="id" id="chkSon{$data.id}" value="{$data.id}" onclick="ChkSonClick('id[]', 'chkAll')" /></td>
                    <td>{$data.id}</td>
                    <td><a href="{:U('Activity/update',array('id'=>$data['id']))}">{$data.act_name}</a></td>
                    <td><a href="{:U('Activity/actcode',array('id'=>$data['id']))}">二维码管理</a></td>
                    <td>{$data.act_profit}</td>
                </tr>
            </volist>
            </tbody>
        </table>
        <div class="well clearfix">
            <div class="pages">{$pages}</div>
        </div>
</block>
<block name="JS">
    <script type="text/JavaScript">
    function loadqrcode(){
        var chk_value =[];
        $('input[name="id"]:checked').each(function(){
            chk_value.push($(this).val());
        });
        if(chk_value.length==0){
            alert ('你还没有选择任何内容！');
            return false;
        }
        window.open('/Fwadmin/Activity/download?id='+chk_value.toString());
    }
    </script>
</block>